package com.slwang.clientModel.config;


import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer;
import org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurerAdapter;
import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerEndpointsConfigurer;
import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerSecurityConfigurer;


@Configuration
public class MyOauth2Config extends AuthorizationServerConfigurerAdapter {

    public void configure(AuthorizationServerSecurityConfigurer security) throws Exception {
    }

    public void configure(ClientDetailsServiceConfigurer clients) throws Exception {

        clients.inMemory().withClient("wslclient01").secret("x").authorizedGrantTypes("authorization_code").scopes("all").autoApprove(true);

    }

    public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception {
    }
}
